package com.company.cloud.article.modules.api.service;

import com.company.cloud.article.modules.api.fallback.ArticleClientServiceFallbackFactory;
import com.company.cloud.article.modules.api.response.ArticleReap;
import com.company.cloud.common.bean.BaseClientResult;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;
import java.util.Set;


@FeignClient(contextId="article", name = ServiceNameConstant.cms_center, fallbackFactory = ArticleClientServiceFallbackFactory.class )
public interface ArticleClientService {
	
    @RequestMapping(value = "/remote/article/articleByNo", method = RequestMethod.GET)
    public BaseClientResult<ArticleReap> getCompanyArticleByNo(@RequestParam("companyArticleNo") String companyArticleNo);

    @RequestMapping(value = "/remote/article/getCompanyArticleMapByNos", method = RequestMethod.POST)
    public BaseClientResult<Map<String, ArticleReap>> getCompanyArticleMapByNos(@RequestBody Set<String> companyArticleNos);

}
